package org.example.com.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 帖子视图对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PostVO implements Serializable {
    private static final long serialVersionUID = 1L;

    private Integer id;
    private Integer userId;
    private String userName;
    private String userAvatar;
    private String content;
    private String privacy;
    private Integer likeCount;
    private Integer commentCount;
    private Integer shareCount;
    private String status;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    
    // 关联数据
    private List<PostImageVO> images;
    private List<PostTopicVO> topics;
    private List<PostCommentVO> comments;
    private Boolean isLiked; // 当前用户是否已点赞
}
